<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>

<rapid:override name="head">
	<title><%=ActivityInfo.TABLE_ALIAS%>新增</title>
	<link rel="stylesheet" type="text/css" href="<c:url value="/widgets/extjs/resources/css/ext-all.css"/>" />
 	<script type="text/javascript" src="<c:url value="/widgets/extjs/adapter/ext/ext-base.js"/>"></script>
    <script type="text/javascript" src="<c:url value="/widgets/extjs/ext-all.js"/>"></script>
<script type="text/javascript" src="<c:url value="/widgets/extjs/ext-lang-zh_CN.js"/>"></script>
</rapid:override>

<rapid:override name="content">
	<s:form action="/pages/ActivityInfo/save.do" method="post">
		<table class="formTable">
		<%@ include file="form_include.jsp" %>
		</table>
		<input id="submitButton" name="submitButton" type="submit" value="提交" />
		<input type="button" value="返回列表" onclick="window.location='${ctx}/pages/ActivityInfo/list.do'"/>
		<input type="button" value="后退" onclick="history.back();"/>
		<input type="button" value="ajax" onclick="subForm(this.form);"/>
	</s:form>

	<script>

		new Validation(document.forms[0],{onSubmit:true,onFormValidate : function(result,form) {
			var finalResult = result;

			//在这里添加自定义验证

			return disableSubmit(finalResult,'submitButton');
		}});
		function subForm(form){
			var paramString = Ext.Ajax.serializeForm(form);
			alert(paramString);
			Ext.Ajax.request({
			       url:'${ctx}/pages/ActivityInfo/save.do',
			       params:paramString,
			       success: function(resp,opts) {

               },
               failure: function(resp,opts) {

                }

			 });

			alert(paramString);
		}





	</script>
</rapid:override>

<%-- jsp模板继承,具体使用请查看: http://code.google.com/p/rapid-framework/wiki/rapid_jsp_extends --%>
<%@ include file="base.jsp" %>